package com.time.sky.mapper;

import com.time.sky.entity.Finfo;
import org.apache.ibatis.annotations.*;

import java.util.List;
@Mapper
public interface FinfoMapper {
    @Select("SELECT * FROM Finfo ")
    List<Finfo> selectList();
    @Insert("insert into Finfo(wall,lift,stair,bear,lobby) " +
            "values(#{wall},#{lift},#{stair},#{bear},#{lobby})")
    void add(Finfo finfo);
    @Delete("delete from Finfo where fid=#{fid}")
    void delete(int fid);
    @Select("SELECT * FROM Finfo  where fid=#{fid}")
    Finfo getById(int fid);
    @Update("update Finfo set wall=#{wall},lift=#{lift},stair=#{stair},bear=#{bear},lobby=#{lobby} where fid=#{fid}")
    void update(Finfo finfo);
    @Select("select count(*) from Finfo")
    int getRowCount();
}
